import os, os.path, sys

google_base_path = '/home/jay/google_appengine'

if not os.path.exists(google_base_path):
    raise EnvironmentError, 'google_appengine folders not found'

sys.path.append(google_base_path)
google_lib_path = os.path.join(google_base_path, 'lib')
sys.path.append(os.path.join(google_lib_path, 'webob'))
sys.path.append(os.path.join(google_lib_path, 'django'))

APP_ID = "article-info"
os.environ['APPLICATION_ID'] = APP_ID

from google.appengine.api import apiproxy_stub_map
from google.appengine.api import datastore_file_stub
from google.appengine.api import mail_stub
from google.appengine.api import urlfetch_stub
from google.appengine.api import user_service_stub

# Start with a fresh api proxy.
apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()

# Use a fresh stub datastore.
stub = datastore_file_stub.DatastoreFileStub(APP_ID, '/home/jay/article/info.db', '/home/jay/article/info2.db')
apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', stub)

###
